using UnityEngine;

public class NPCDialogManager : MonoBehaviour
{
	public GUIPlayerItemLoader PlayerItemLoader;

	public GUIIStockItemLoader SecondItemLoader;

	public PlayerHUDCanvas HUD;

	private void Start()
	{
		HUD = (PlayerHUDCanvas)UnityEngine.Object.FindObjectOfType(typeof(PlayerHUDCanvas));
		if ((bool)HUD)
		{
			HUD.OpenPanelByName("InventoryStock");
		}
	}

	public void OpenStock(ItemStocker stock)
	{
		SecondItemLoader.OpenInventory(stock.inventory, "Stock");
		if ((bool)HUD)
		{
			HUD.OpenPanelByName("InventoryStock");
		}
	}

	public void CloseStock()
	{
		if ((bool)HUD)
		{
			HUD.ClosePanelByName("InventoryStock");
		}
	}
}
